#include "STC89C5xRC.h"

#define u16 unsigned int
#define u8  unsigned char
#define beep P23 
#define WELA P27
#define DULA P26

void DelayMs(u16 ms);


void main()                                                                                            
{

	while(1)
	{
		WELA = 1;
		P0 = 0Xfe;
		WELA = 0;  
		DULA = 1;
		P0 = 0x06;
		DULA = 0;
		DelayMs(1);
		
		WELA = 1;
		P0 = 0Xfd;
		WELA = 0;  
		DULA = 1;
		P0 = 0x5b;
		DULA = 0;
		DelayMs(1);
		
		WELA = 1;
		P0 = 0Xfb;
		WELA = 0;  
		DULA = 1;
		P0 = 0x4f;
		DULA = 0;
		DelayMs(1);
	}
}

void DelayMs(u16 ms)
{
	u16 a,b;
	for(a = ms;a > 0;a--)
		for(b = 114;b > 0;b--);
}


